GList *groups;
gboolean has_filtered_group;
- gboolean need_reflow;
};
struct _GtkShortcutsSectionClass
static void gtk_shortcuts_section_show_all (GtkShortcutsSection *self);
static void gtk_shortcuts_section_filter_groups (GtkShortcutsSection *self);
static void gtk_shortcuts_section_reflow_groups (GtkShortcutsSection *self);
-static void gtk_shortcuts_section_maybe_reflow (GtkShortcutsSection *self);
static gboolean gtk_shortcuts_section_change_current_page (GtkShortcutsSection *self,
gint offset);
{
GtkShortcutsSection *self = GTK_SHORTCUTS_SECTION (widget);
- if (self->need_reflow)
- gtk_shortcuts_section_reflow_groups (self);
-
GTK_WIDGET_CLASS (gtk_shortcuts_section_parent_class)->map (widget);
map_child (GTK_WIDGET (self->stack));
self->max_height = max_height;
- gtk_shortcuts_section_maybe_reflow (self);
+ gtk_shortcuts_section_reflow_groups (self);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MAX_HEIGHT]);
}
gtk_container_add (GTK_CONTAINER (column), GTK_WIDGET (group));
self->groups = g_list_append (self->groups, group);
- gtk_shortcuts_section_maybe_reflow (self);
+ gtk_shortcuts_section_reflow_groups (self);
}
static void
gtk_widget_get_visible (GTK_WIDGET (self->switcher)));
}
-static void
-gtk_shortcuts_section_maybe_reflow (GtkShortcutsSection *self)
-{
- if (gtk_widget_get_mapped (GTK_WIDGET (self)))
- gtk_shortcuts_section_reflow_groups (self);
- else
- self->need_reflow = TRUE;
-}
-
static void
adjust_page_buttons (GtkWidget *widget,
gpointer data)
/* clean up */
g_list_free (groups);
g_list_free (pages);
-
- self->need_reflow = FALSE;
}
static gboolean